home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODF-Interest Archive / August 96 / Re Read ⁄ Write FW_OFileSpecif < prev    next >
Encoding:
Internet Message Format  |  1996-08-15  |  1.2 KB  |  [TEXT/ttxt]

  1. Subject:     Re: Read / Write FW_OFileSpecification
  2. Sent:        8/15/96 5:10 PM
  3. Received:    8/15/96 4:31 PM
  4. From:        john paulson, paulson3@apple.com
  5. Reply-To:    ODF Interest, ODF-Interest@CILabs.ORG
  6. To:          OpenDoc Development Framework Discussion List, ODF-Interest@CILabs.
  7.  
  8.  
  9. >
  10. >How do I read and write an FW_OFileSpecification to and from a stream? 
  11. >Will ODF2 override the << and >> operators for all framework classes?
  12.  
  13.   Why do this?  Filenames are not cross platform, users can 
  14. move/delete/rename 
  15. files between the times you save the file spec and the next time the file 
  16. spec is 
  17. fetched.  Invalid, stale data.
  18.  
  19.   If you _must_ do this, you have several options:
  20.  
  21. 1. Mac only
  22.    Use the "void MacGetFSSpec(out FSSpec macSpec);" method to get the 
  23. FSSpec.  Then 
  24.    you can either save the FSSpec, or (preferably) get an AliasHandle 
  25. from the FSSpec 
  26.    and save the AliasHandle.  To re-create the FW_OFileSpecification, you 
  27. can create 
  28.    a FW_OFileSpec and then call "void AssignFileSpec(in FSSpec* 
  29. macSpec);" to assign 
  30.    the FSSpec to it.  
  31.  
  32. 2. Platform independent
  33.    Get the full pathname using "void GetFullPath(out FW_HString 
  34. fullPathName);" and 
  35.    re-create with "void InitFromFileName(in FW_HString fileName);"
  36.  
  37. Hope this helps.
  38.  
  39.